﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

#nullable disable

namespace T4.Console.Db.Models
{
    [Table("Blog_Focus")]
    [Index(nameof(PersonId), nameof(FocusOnId), Name = "AK_KEY_2_Blog_Focus", IsUnique = true)]
    [Index(nameof(PersonId), Name = "Index_1")]
    [Index(nameof(FocusOnId), Name = "Index_2")]
    [Index(nameof(PersonId), nameof(FocusOnId), Name = "Index_3")]
    public partial class Blog_Focus
    {
        [Key]
        [StringLength(36)]
        public string Id { get; set; }
        [Required]
        [StringLength(36)]
        public string PersonId { get; set; }
        [Required]
        [StringLength(36)]
        public string FocusOnId { get; set; }
        [StringLength(36)]
        public string CreatedBy { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? CreatedTime { get; set; }
        [StringLength(36)]
        public string LastModifiedBy { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? LastModifiedTime { get; set; }

        [ForeignKey(nameof(FocusOnId))]
        [InverseProperty(nameof(Sys_User.Blog_FocusFocusOns))]
        public virtual Sys_User FocusOn { get; set; }
        [ForeignKey(nameof(PersonId))]
        [InverseProperty(nameof(Sys_User.Blog_FocusPeople))]
        public virtual Sys_User Person { get; set; }
    }
}
